#!/bin/sh

case $# in
0) echo "usage: timer [number] [mh]"; exit 1
esac

arg=$1
case $2 in
'm')	arg=`python3 -c "print(60 * $arg)"` ;;
'h') 	arg=`python3 -c "print(3600 * $arg)"` ;;
*)	arg=`python3 -c "print(60 * $arg)"`
esac
echo "start time: `date | awk '{ print $4 }'`"
echo "timer is for $arg seconds"
sleep $arg
echo "timer done"
# mpv ~/Downloads/newgq1.wav
